//
//  SuccessToLoginController.m
//  XiaoMiao
//
//  Created by kinglian_iOS_000 on 2018/1/20.
//  Copyright © 2018年 smallyou. All rights reserved.
//

#import "SuccessToOriginController.h"

@interface SuccessToOriginController () {
    NSString *navTitle_;
    NSString *desTitle_;
    NSString *btnTitle_;
}
@property (weak, nonatomic) IBOutlet UILabel *desLabel;
@property (weak, nonatomic) IBOutlet UIButton *btn;
@property (weak, nonatomic) IBOutlet UIImageView *imageView;

@end

@implementation SuccessToOriginController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem app_createItemTitle:@"" target:nil action:nil];
    
    self.navigationItem.title = navTitle_;
    self.desLabel.text = desTitle_;
    [self.btn setTitle:btnTitle_ forState:UIControlStateNormal];
    
    [self.btn addTarget:self action:@selector(btnDidClick) forControlEvents:UIControlEventTouchUpInside];
}

- (void)setNavTitle:(NSString *)navTitle
           desTitle:(NSString *)desTitle
           btnTitle:(NSString *)btnTitl
{
    navTitle_ = navTitle;
    desTitle_ = desTitle;
    btnTitle_ = btnTitl;
}

- (void)setImageName:(NSString *)imageName {
    _imageName = imageName;
    
    self.imageView.image = [UIImage imageNamed:imageName];
}

#pragma mark - Action
- (void)btnDidClick {
    if (self.btnClickHandle) {
        self.btnClickHandle(self);
    }
}

@end
